package com.codi.bus.core.util;


import com.codi.goldlife.external.databean.ResultBean;

/**
 * @Author: zengxl
 * @Description:
 * @Date:2017/12/22 10:00
 */
public class ResultBeanUtil {
    public static ResultBean setUnSuccessResult(ResultBean resultBean, int code, String message){
        resultBean.setSuccess(false);
        resultBean.setErrorCode(code);
        resultBean.setErrorMessage(message);
        resultBean.setResult("");
        return resultBean;
    }
    public static ResultBean setSuccessResult(ResultBean resultBean, Object result){
        resultBean.setSuccess(true);
        resultBean.setErrorCode(0);
        resultBean.setErrorMessage("");
        resultBean.setResult(result);
        return resultBean;
    }
}
